﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using GameEngine.Clients.Silverlight.View.Components;
using GameEngine.Model.Data;

namespace MySettlers
{
    public partial class WorldEditorUC : UserControl
    {
        private static WorldEditorUC instance;
        public static WorldEditorUC Instance
        {
            get{
                return instance;
            }
        }
        public WorldEditorUC(ILevelVO<int> level)
        {
            InitializeComponent();
            instance = this;
        }

        public void SetWorldView(WorldUC worldView) {
            worldContainer.Children.Clear();
            worldContainer.Children.Add(worldView);
        }

        public void setFPS(int fps) {
            fpsTextBlock.Text = fps + " fps";
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            string buttonName = ((Button)sender).Name;
            if(buttonName.Equals(addButton.Name)){
                //aparece ecra com o que se pode adicionar
                new NewThingUC().Show();
            }else if(buttonName.Equals(removeButton.Name)){
                //remover elementos removivies, obj removivies mudam de layout
            }else if(buttonName.Equals(exitButton.Name)){
                //logout
            }
        }
    }
}
